<template>
	<div>
		
		<!-- 头部 -->
		<van-nav-bar left-arrow :fixed="true" :placeholder='true' @click-left='back' @click-right='gohome'>
			
			<template #title>
				<slot><div>分类</div></slot>
			</template>
			<template #right>
				<van-icon name="wap-home-o" size="18" color="#FFFFFF" />
			</template>
		</van-nav-bar>
		
	</div>
</template>

<script>
	
	export default {
		
		name:'Roof',
		
		methods:{
			
			//返回上一级路由
			back(){
				console.log('s')
				this.$router.back()
			},
			
			//返回主页
			gohome(){
				this.$router.push({name:'home'})
			}
		}
		
		
	}
	
	
	
</script>

<style scoped>
	
	::v-deep .van-nav-bar__content {
		background-color: #A32F2A;
	}
	
	::v-deep .van-icon-arrow-left,
	::v-deep .van-nav-bar__title,
	::v-deep .van-icon-wap-home-o {
		color: #FFFFFF;
	}
	
</style>